package com.avic.rong.fragment.collect;


import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.avic.rong.R;
import com.avic.rong.fragment.BaseLazyFragment;
import com.avic.rong.wedgit.loadingLayout.LoadingLayout;
import com.example.minato.minastore.http.HttpManager;
import com.scwang.smartrefresh.layout.SmartRefreshLayout;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.Unbinder;

/**
 * A simple {@link Fragment} subclass.
 */
public class AchievementsTransformationFragment extends BaseLazyFragment {


    @BindView(R.id.recycler_achieve)
    RecyclerView recycler_achieve;
    @BindView(R.id.refresh_achieve)
    SmartRefreshLayout refresh_achieve;
    @BindView(R.id.loading_layout)
    LoadingLayout loading_layout;
    private View view;
    private Unbinder unbinder;

    public AchievementsTransformationFragment() {
        // Required empty public constructor
    }


    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        // Inflate the layout for this fragment
        View inflate = inflater.inflate(R.layout.fragment_achievements_transformation, container, false);
        unbinder = ButterKnife.bind(this, inflate);

        loading_layout = inflate.findViewById(R.id.loading_layout);
        loading_layout.setStatus(LoadingLayout.LOADING);
        loading_layout.setOnReloadListener(new LoadingLayout.OnReloadListener() {
            @Override
            public void onReload(View v) {
               // HttpManager.getInstance().doHttpDeal();
                loading_layout.setStatus(LoadingLayout.LOADING);
            }

            @Override
            public void onReturn(View v) {
                getActivity().onBackPressed();
            }
        });
        LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getContext());

        return inflate;
    }

    @Override
    public void loadData() {

    }

    @Override
    public void onDestroyView() {
        super.onDestroyView();
        unbinder.unbind();
    }
}
